package com.adlotto2.android.cronos.datahandler;

import java.util.ArrayList;
import java.util.HashMap;

public class CNResultSet {
	protected String mRcode = null;
	protected String mRmsg = null;

	protected int mPageSize = 0;
	protected int mPageNumber = 0;
	protected int mTotalCount = 0;
	protected int mTotalPageNumber = 0;
	
	protected String mLottoNum1 = null;
	protected String mLottoNum2 = null;
	protected String mLottoNum3 = null;
	protected String mLottoNum4 = null;
	protected String mLottoNum5 = null;
	protected String mLottoNum6 = null;
	
	protected String nujukMoney = null;
	protected String askMoney = null;
	protected String paidMoney = null;
	protected String usableMoney = null;
	
	protected String totalWinner = null;
	
	protected String mSendSeq = null;
	
	protected ArrayList<CNBaseDataSet> mDataSetList = null;

	protected HashMap<String, String> mExtraData = null;

	public boolean isSuccess() {
		return (this.mRcode != null) && (this.mRcode.equals("RET0000"));
	}

	public String getRcode() {
		return this.mRcode;
	}

	public void setRcode(String rcode) {
		this.mRcode = rcode;
	}

	public String getRmsg() {
		return this.mRmsg;
	}

	public void setRmsg(String rmsg) {
		this.mRmsg = rmsg;
	}

	public int getPageSize() {
		return this.mPageSize;
	}

	public void setPageSize(int size) {
		this.mPageSize = size;
	}

	public int getPageNumber() {
		return this.mPageNumber;
	}

	public void setPageNumber(int number) {
		this.mPageNumber = number;
	}

	public int getTotalCount() {
		return this.mTotalCount;
	}

	public void setTotalCount(int count) {
		this.mTotalCount = count;
	}

	public int getTotalPageNumber() {
		return this.mTotalPageNumber;
	}

	public void setTotalPageNumber(int totalPageNumber) {
		this.mTotalPageNumber = totalPageNumber;
	}

	public void addDataSet(CNBaseDataSet dataSet) {
		if (dataSet != null) {
			if (this.mDataSetList == null) {
				this.mDataSetList = new ArrayList<CNBaseDataSet>();
			}

			this.mDataSetList.add(dataSet);
		}
	}

	public ArrayList<CNBaseDataSet> getDataSetList() {
		return this.mDataSetList;
	}

	public CNBaseDataSet getDataSet() {
		if ((this.mDataSetList != null) && (this.mDataSetList.size() > 0)) {
			return (CNBaseDataSet) this.mDataSetList.get(0);
		}

		return null;
	}

	public int getDataSetCount() {
		if (this.mDataSetList != null) {
			return this.mDataSetList.size();
		}

		return 0;
	}

	@SuppressWarnings({ "rawtypes", "unchecked" })
	public void addExtraData(String key, String value) {
		if ((key != null) && (value != null)) {
			if (this.mExtraData == null) {
				this.mExtraData = new HashMap();
			}

			this.mExtraData.put(key, value);
		}
	}

	public int getExtraDataCount() {
		if (this.mExtraData != null) {
			return this.mExtraData.size();
		}

		return 0;
	}

	public String getExtraData(String key) {
		if (key != null) {
			return (String) this.mExtraData.get(key);
		}

		return null;
	}

	public String getExtraData(String key, String defaultValue) {
		if (key != null) {
			String value = (String) this.mExtraData.get(key);
			if (value != null) {
				return value;
			}
		}

		return defaultValue;
	}
	
	public String getmLottoNum1() {
		return mLottoNum1;
	}

	public void setmLottoNum1(String mLottoNum1) {
		this.mLottoNum1 = mLottoNum1;
	}

	public String getmLottoNum2() {
		return mLottoNum2;
	}

	public void setmLottoNum2(String mLottoNum2) {
		this.mLottoNum2 = mLottoNum2;
	}

	public String getmLottoNum3() {
		return mLottoNum3;
	}

	public void setmLottoNum3(String mLottoNum3) {
		this.mLottoNum3 = mLottoNum3;
	}

	public String getmLottoNum4() {
		return mLottoNum4;
	}

	public void setmLottoNum4(String mLottoNum4) {
		this.mLottoNum4 = mLottoNum4;
	}

	public String getmLottoNum5() {
		return mLottoNum5;
	}

	public void setmLottoNum5(String mLottoNum5) {
		this.mLottoNum5 = mLottoNum5;
	}

	public String getmLottoNum6() {
		return mLottoNum6;
	}

	public void setmLottoNum6(String mLottoNum6) {
		this.mLottoNum6 = mLottoNum6;
	}

	public String getmSendSeq() {
		return mSendSeq;
	}

	public void setmSendSeq(String mSendSeq) {
		this.mSendSeq = mSendSeq;
	}

	public String getNujukMoney() {
		return nujukMoney;
	}

	public void setNujukMoney(String nujukMoney) {
		this.nujukMoney = nujukMoney;
	}

	public String getAskMoney() {
		return askMoney;
	}

	public void setAskMoney(String askMoney) {
		this.askMoney = askMoney;
	}

	public String getPaidMoney() {
		return paidMoney;
	}

	public void setPaidMoney(String paidMoney) {
		this.paidMoney = paidMoney;
	}

	public String getUsableMoney() {
		return usableMoney;
	}

	public void setUsableMoney(String usableMoney) {
		this.usableMoney = usableMoney;
	}

	public String getTotalWinner() {
		return totalWinner;
	}

	public void setTotalWinner(String totalWinner) {
		this.totalWinner = totalWinner;
	}
}